import request from '@/utils/request'

export function fetchList(query) {
    return request({
        url: '/core/coding/tmptAuthUser/myPage',
        method: 'GET',
        params: query
    })
}

export function fetchTmptAuthPositionListByDeptId(query) {
    return request({
        url: '/core/coding/tmptAuthPosition/myPage',
        method: 'GET',
        params: query
    })
}


export function createApi(data) {
    return request({
        url: '/core/coding/tmptAuthUser/create',
        method: 'POST',
        data
    })
}

export function updateApi(data) {
    return request({
        url: '/core/coding/tmptAuthUser/update',
        method: 'POST',
        data
    })
}

export function deleteApi(params) {
    return request({
        url: '/core/coding/tmptAuthUser/delete',
        method: 'POST',
        params
    })
}

export function getRoleList(params) {
  return request({
    url: '/core/admin123/right_v2/roleList',
    method: 'get',
    params
  })
}


export function treeApi4Region(query) {
  return request({
    url: '/city/coding/ctcRegion/tree',
    method: 'GET',
    params: query
  })
}

export function treeApi4Dept(query) {
  return request({
    url: '/core/coding/tmptAuthDept/tree',
    method: 'GET',
    params: query
  })
}
